﻿using System;
using System.Linq;
using System.Text;
using SqlSugar;

namespace Crossroad.System.Common.Model
{
    ///<summary>
    ///通用附件
    ///</summary>
    [SugarTable("common_attachment")]
    public partial class Attachment : ModelContext
    {
        public Attachment()
        {
            LoadDefVal();
        }
        public Attachment(bool loadDef)
        {
            if (loadDef)
                LoadDefVal();
        }

        private void LoadDefVal()
        {
            this.uploadTime = Convert.ToInt32("0");
            this.uploaderId = Convert.ToInt32("0");
        }

        /// <summary>
        /// Desc:相对路径
        /// Default:
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "relative_path")]
        public string relativePath { get; set; }

        /// <summary>
        /// Desc:类型
        /// Default:
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "type_id")]
        public string typeId { get; set; }

        /// <summary>
        /// Desc:上传时间
        /// Default:0
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "upload_time")]
        public int? uploadTime { get; set; }

        /// <summary>
        /// Desc:上传人
        /// Default:0
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "uploader_id")]
        public int? uploaderId { get; set; }

        /// <summary>
        /// Desc:id
        /// Default:
        /// Nullable:False
        /// </summary>           
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public long id { get; set; }

        /// <summary>
        /// Desc:名称
        /// Default:
        /// Nullable:False
        /// </summary>           
        public string name { get; set; }

    }
}
